<?php
namespace Home\Controller;
use Think\Controller;

class CommonController extends Controller{
	public function _initialize(){
 		// $lang = I('get.l','zh-cn');
   //  session('lang',$lang);
	}

  public function message(){
    $this->display('Public/message');
  }
  
  public function check_EN_ZH($article){
  	if($_COOKIE['think_language']=='en-us'){
    	if($article['title_en']){
    		$article['title'] = nl2br($article['title_en']);
    	}else{
    		$article['title'] = nl2br($article['title']);
    	}
    	
    	if($article['content_en']){
    		$article['content'] = $article['content_en'];
    	}else{
    		$article['content'] = $article['content'];
    	}
    }else {
    	$article['title'] = nl2br($article['title']);
    	$article['content'] = $article['content'];
    }
  	
    return $article;
  }
  
}
?>
